home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu453.dms
/
pu453.adf
/
extras
/
basic_sources
/
wdb2.bas
< prev
Wrap
BASIC Source File
|
1992-11-08
|
1KB
|
87 lines
SCREEN 1,640,512,3,4
WINDOW 1,"WorldDataBank",(0,0)-(620,490),0,1
PALETTE 0,0,0,0 : PALETTE 1,0,.7,0
PALETTE 2,1,0,0 : PALETTE 3,1,1,1
PALETTE 4,.7,0,0 : PALETTE 5,0,1,0
PALETTE 6,.2,.7,.5 : PALETTE 7,0,0,1
xs = 0 : ys = 0
xe = 600 : ye = 490
xw = 600 : yw = 490
REM $option K300
DIM a%(150000)
mloc = VARPTR(a%(1))
OPEN "dh2:worlddatabank/wdb.5.all" AS #1 LEN=6
'OPEN "ram:wdb.5.all" AS #1 LEN=6
FIELD #1,2 AS code$,2 AS y$,2 AS x$
REM use CVI to convert
l = LOF(1)
nrec = (l/6)-1
n = 0
mag = 1
xoff = 0
yoff = 0
WHILE INKEY$ = "" AND n < nrec
INCR n
getrec2 n,t,x,y
x = x + 10800
y = y + 5400
y = y/10800
x = x/21600
x = x - xoff
y = y - yoff
x = x * mag
y = y * mag
x = x * xw
y = y * yw
x = x + xs
y = y + ys
y = ye - y
IF t > 10 THEN
COLOR INT(t/1000)
IF x < xe AND x > xs AND y < ye AND y > ys
PSET(x,y)
END IF
ox = x : oy = y
ELSE
IF x < xe AND x > xs AND y < ye AND y > ys
IF ABS(x-ox) < 300 THEN
LINE (ox,oy)-(x,y)
END IF
END IF
ox = x : oy = y
END IF
WEND
CLOSE #1
SUB getrec(n,t,x,y,mstart) STATIC
SHARED nrec
IF n > nrec THEN n = nrec
n = INT(n)
x1 = ((n-1)*6)+mstart
t = PEEKW(x1)
y = PEEKW(x1+2)
x = PEEKW(x1+4)
END SUB
SUB getrec2(n,t,x,y) STATIC
SHARED nrec,code$,x$,y$
n = INT(n)
GET #1,n
t = CVI(code$)
x = CVI(x$)
y = CVI(y$)
END SUB